% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/latlon_infer.R
\name{latlon_infer}
\alias{latlon_infer}
\title{Guess which columns have lat and lon based on aliases like latitude, FacLat, etc.}
\usage{
latlon_infer(mycolnames)
}
\arguments{
\item{mycolnames}{e.g., colnames(x) where x is a data.frame from read.csv}
}
\value{
returns all of mycolnames except replacing the best candidates with lat and lon
}
\description{
Guess which columns have lat and lon based on aliases like latitude, FacLat, etc.
}
\examples{
  latlon_infer(c('trilat', 'belong', 'belong')) # warns if no alias found, 
    #  but doesnt warn of dupes in other terms, just preferred term.
  latlon_infer(c('a', 'LONG', 'Longitude', 'lat')) # only the best alias is converted/used
  latlon_infer(c('a', 'LONGITUDE', 'Long', 'Lat')) # only the best alias is converted/used
  latlon_infer(c('a', 'longing', 'Lat', 'lat', 'LAT')) # case variants of preferred are 
      # left alone only if lowercase one is found
  latlon_infer(c('LONG', 'long', 'lat')) # case variants of a single alias are 
      # converted to preferred word (if pref not found), creating dupes!  warn!
  latlon_infer(c('LONG', 'LONG')) # dupes of an alias are renamed and still are dupes! warn!
  latlon_infer(c('lat', 'lat', 'Lon')) # dupes left as dupes but warn!

}
\seealso{
latlon_df_clean() latlon_is.valid() latlon_as.numeric()\code{\link[=fixnames_aliases]{fixnames_aliases()}} \code{\link[=fixcolnames_infer]{fixcolnames_infer()}}
}
\keyword{internal}
